<html>
    <head>
        <meta charset="UTF-8">
        <script>
        window.onload = function() {
            document.getElementById("pasteArea").focus();
        }
        document.onpaste = function(event) {
            var items = (event.clipboardData || event.originalEvent.clipboardData).items;
            var blob = null;
            for (var i = 0; i < items.length; ++i) {
                if (items[i].type.indexOf("image/png") !== -1) {
                    blob = items[i].getAsFile();
                    break;
                }
            }
            if (!blob)
                return;
            var reader = new FileReader();
            reader.onload = function(event) {
                window.myImageDataURL = event.target.result;
            }
            reader.readAsDataURL(blob);
        };
        </script>
    </head>
    <body>
        <textarea id="pasteArea" placeholder="paste here"></textarea>
    </body>
</html>
